home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / config.h < prev    next >
C/C++ Source or Header  |  2001-08-08  |  12KB  |  374 lines

  1. /* DO NOT EDIT!
  2.  *
  3.  * This file is created automatically by configure from the template
  4.  * in config.h.in.
  5.  */
  6.  
  7. #ifndef CONFIG_H__
  8. #define CONFIG_H__ 1
  9.  
  10. /* Should code for the external request demon be included?
  11.  */
  12. #undef ERQ_DEMON
  13.  
  14. /* Maximum sizes for an erq send or reply.
  15.  */
  16. #define ERQ_MAX_REPLY 1024
  17. #define ERQ_MAX_SEND  1024
  18.  
  19. /* #define ACCESS_CONTROL if you want the driver to do any access control.
  20.  * TODO: Make this a runtime option.
  21.  */
  22. #undef ACCESS_CONTROL
  23.  
  24. /* file for access permissions data */
  25. /* TODO: Make this a runtime option */
  26. #define ACCESS_FILE               "ACCESS.ALLOW"
  27.  
  28. /* logfile to show valid and rejected connections
  29.  * simple not define this for NO logs
  30.  * TODO: Make this a runtime option.
  31.  */
  32. #undef ACCESS_LOG 
  33.  
  34. /*
  35.  * Max size of a file allowed to be read by 'read_file()'.
  36.  */
  37. #define READ_FILE_MAX_SIZE        65536
  38.  
  39. /* If an object is left alone for a certain time, then the
  40.  * function clean_up will be called. This function can do anything,
  41.  * like destructing the object. If the function isn't defined by the
  42.  * object, then nothing will happen.
  43.  *
  44.  * This time should be substantially longer than the swapping time.
  45.  */
  46. #define TIME_TO_CLEAN_UP          3600
  47.  
  48. /*
  49.  * How long time until an unused object is swapped out.
  50.  * Machine with too many players and too little memory: 900 (15 minutes)
  51.  * Machine with few players and lot of memory: 10000
  52.  * Machine with infinite memory: 0 (never swap).
  53.  */
  54. #define TIME_TO_SWAP              300
  55. #define TIME_TO_SWAP_VARIABLES    600
  56.  
  57. /*
  58.  * How many seconds until an object is reset again.
  59.  * Set this value high if big system, otherwise low.
  60.  * No castles:         1800        (30 minutes)
  61.  * >100 castles:10000        (almost 3 hours).
  62.  */
  63. #define TIME_TO_RESET             1800
  64.  
  65. /*
  66.  * Define the maximum stack size of the stack machine. This stack will also
  67.  * contain all local variables and arguments.
  68.  */
  69. #define EVALUATOR_STACK_SIZE      2000
  70.  
  71. /*
  72.  * Define the maximum call depth for functions.
  73.  * MAX_USER_TRACE is used for for normal program execution, the full
  74.  * MAX_TRACE is only available in error handling.
  75.  */
  76. #define MAX_USER_TRACE              64
  77. #define MAX_TRACE                   72
  78.  
  79. /*
  80.  * Define the size of the compiler stack. This defines how complex
  81.  * expressions the compiler can parse. The value should be big enough.
  82.  */
  83. #define COMPILER_STACK_SIZE        400
  84.  
  85. /*
  86.  * Maximum number of bits in a bit field. They are stored in printable
  87.  * strings, 6 bits per byte.
  88.  * The limit is more based on considerations of speed than memory
  89.  * consumption.
  90.  */
  91. #define MAX_BITS                  6144
  92.  
  93. /*
  94.  * Define what port number the game is to use.
  95.  */
  96. #define PORTNO                    4444
  97.  
  98. /* Maximum numbers of ports the GD accepts connections to.
  99.  */
  100. #define MAXNUMPORTS                 1
  101.  
  102. /*
  103.  * Max number of local variables in a function.
  104.  */
  105. #define MAX_LOCAL                   50
  106.  
  107. /* Maximum number of evaluated nodes/loop.
  108.  * If this is exceeded, the current function is halted.
  109.  * ls() can take about 30000 for large directories.
  110.  */
  111. #define MAX_COST               1048576
  112.  
  113. /* CATCH_RESERVED_COST is added to the eval cost for the time executing code
  114.  * guarded by a catch() statement, so that an eval_cost-too-big error can
  115.  * still be caught and handled.
  116.  *
  117.  * To catch an eval_cost too big error in an object that called recursive
  118.  * master functions, CATCH_RESERVED_COST should be greater than
  119.  * MASTER_RESERVED_COST * 2.
  120.  * TODO: Check that at runtime.
  121.  */
  122. #define CATCH_RESERVED_COST       2048
  123.  
  124. /* MASTER_RESERVED_COST is the total reserve available for master applies.
  125.  * It is halved for every recursion into another master apply.
  126.  */
  127. #define MASTER_RESERVED_COST    0x200 /* must be power of 2 */
  128. /* TODO: Check that at runtime */
  129.  
  130. /*
  131.  * Where to swap out objects. This file is not used if TIME_TO_SWAP is 0.
  132.  * If the mudlib is mounted via nfs but your /tmp isn't, and isn't purged
  133.  * periodically either, it's a good idea to place the swap file there.
  134.  * The hostname will be appended to the filename defined here.
  135.  */
  136. #define SWAP_FILE                 "/tmp/LP_SWAP.3"
  137.  
  138. /* Where to save the WIZLIST information.
  139.  * If not defined, and neither given on the commandline, the driver will
  140.  * not read the WIZLIST file.
  141.  */
  142. #define WIZLIST_FILE              "WIZLIST"
  143.  
  144. /* This is the maximum array size allowed for one single array.
  145.  * If 0, any size is allowed.
  146.  */
  147. #define MAX_ARRAY_SIZE            5000
  148.  
  149. /* This is the maximum array size allowed for one single mapping.
  150.  * If 0, any size is allowed.
  151.  */
  152. #define MAX_MAPPING_SIZE            5000
  153.  
  154. /* This is the maximum number of callouts allowed at one time.
  155.  * If 0, any number is allowed.
  156.  */
  157. #define MAX_CALLOUTS              0
  158.  
  159. /*
  160.  * If this is defined, expensive operations like string additions
  161.  * receive additional evalcosts depending on the amount of data handled.
  162.  */
  163.  
  164. #undef DYNAMIC_COSTS
  165.  
  166. /*
  167.  * Maximum number of players in the game.
  168.  */
  169. #define MAX_PLAYERS                16
  170.  
  171. /*
  172.  * When uploading files, we want fast response; however, normal players
  173.  * shouldn't be able to hog the system in this way.  Define ALLOWED_ED_CMDS
  174.  * to be the ratio of the no of ed cmds executed per player cmd, and
  175.  * MAX_CMDS_PER_BEAT to be the max no of buffered player commands the
  176.  * system will accept in each heartbeat interval.
  177.  */
  178.  
  179. #define ALLOWED_ED_CMDS           16
  180. /* TODO: ALLOWED_ED_CMDS: make this a runtime option */
  181.  
  182. #define MAX_CMDS_PER_BEAT            5 /* TODO: not implemented yet :-( */
  183.  
  184. /*
  185.  * Reserve an extra memory area from malloc(), to free when we run out
  186.  * of memory to get some warning and start Armageddon.
  187.  * If this value is 0, no area will be reserved.
  188.  */
  189. #define RESERVED_USER_SIZE      49152
  190. #define RESERVED_MASTER_SIZE    4096
  191. #define RESERVED_SYSTEM_SIZE    12288
  192.  
  193. /* Define the size of the shared string hash table.  This number needn't
  194.  * be prime, probably between 1000 and 30000; if you set it to about 1/5
  195.  * of the number of distinct strings you have, you will get a hit ratio
  196.  * (number of comparisons to find a string) very close to 1, as found strings
  197.  * are automatically moved to the head of a hash chain.  You will never
  198.  * need more, and you will still get good results with a smaller table.
  199.  * If the size is a power of two, hashing will be faster.
  200.  */
  201.  
  202. #define HTABLE_SIZE               8192
  203.  
  204. /* Define the size of the table of defines, reserved words, identifiers
  205.  * and efun names. Should be either several times smaller than HTABLE_SIZE
  206.  * or identical with it.
  207.  */
  208. #define ITABLE_SIZE               256
  209.  
  210. /* Object hash table size.
  211.  * Define this like you did with the strings; probably set to about 1/4 of
  212.  * the number of objects in a game, as the distribution of accesses to
  213.  * objects is somewhat more uniform than that of strings.
  214.  */
  215.  
  216. #define OTABLE_SIZE               4096
  217.  
  218. /* Maximum size of an expanded preprocessor definition.
  219.  */
  220.  
  221. #define DEFMAX                   65536
  222.  
  223. /* the number of apply_low cache entries will be 2^APPLY_CACHE_BITS.
  224.  */
  225. #define APPLY_CACHE_BITS            12
  226.  
  227. /* The parameters of the regular expression/result cache.
  228.  * The expression cache uses a hashtable of RXCACHE_TABLE entries.
  229.  * Undefine RXCACHE_TABLE to disable the all regexp caching.
  230.  */
  231.  
  232. #define RXCACHE_TABLE            16384
  233.  
  234. /*
  235.  * Should newly defined LPC functions be aligned in memory? this costs 1.5
  236.  * bytes on average, but saves some time when searching in case of an
  237.  * apply_low cache function miss.
  238.  */
  239. #define ALIGN_FUNCTIONS
  240.  
  241. /* Define COMPAT_MODE if you are using the 2.4.5 mudlib or one of its
  242.  * derivatives.
  243.  * TODO: Make this a runtime option.
  244.  */
  245. #undef COMPAT_MODE
  246.  
  247. /* Define STRICT_EUIDS if the driver is to enforce the use of euids,
  248.  * ie. load_object() and clone_object() require the current object to
  249.  * have a non-zero euid.
  250.  */
  251. #define STRICT_EUIDS
  252.  
  253. /* Define SUPPLY_PARSE_COMMAND if you want the efun parse_command.
  254.  * If you don't need it, better #undef it, lest some new wiz can inadvertly
  255.  * crash your mud or make it leak memory.
  256.  */
  257. #undef SUPPLY_PARSE_COMMAND
  258.  
  259. /* Define INITIALIZATION_BY___INIT if you want all initializations of variables
  260.  * to be suspended till the object is created ( as supposed to initialization
  261.  * at compile time; the latter is more memory efficient for loading and faster
  262.  * at cloning, while the former allows to use efuns, e.g. shutdown().
  263.  */
  264. #undef INITIALIZATION_BY___INIT
  265.  
  266. /* Define USE_SYSTEM_CRYPT if you want crypt() to be implemented by your
  267.  * operating system (assuming it offers this function). This makes your
  268.  * programm smaller and may even let you take advantage of improvements
  269.  * of your OS, but may also prohibit transporting encrypted date like
  270.  * passwords between different systems.
  271.  * Undefine USE_SYSTEM_CRYPT if you want to use the driver's portable
  272.  * crypt() implementation.
  273.  */
  274. #define USE_SYSTEM_CRYPT
  275.  
  276. /* The name of the master object.
  277.  */
  278. #define MASTER_NAME              "secure/master"
  279.  
  280. /*
  281.  * Define MAX_BYTE_TRANSFER to the number of bytes you allow to be read
  282.  * and written with read_bytes and write_bytes
  283.  */
  284.  
  285. #define MAX_BYTE_TRANSFER        65536
  286.  
  287. /* Define this to the port on which the driver can receive UDP message.
  288.  * If set to -1, the port will not be opened unless the mud is given a valid
  289.  * port number on startup with the -u commandline option.
  290.  */
  291. #define UDP_PORT            4446
  292.  
  293. /* Define this if you want IPv6 support (assuming that your host
  294.  * actually offers this.
  295.  */
  296. #undef USE_IPV6
  297.  
  298. /* Define this if you want alist support.
  299.  */
  300. #define USE_ALISTS
  301.  
  302. /* Define this if you want mySQL support (assuming that your host
  303.  * actually offers this.
  304.  */
  305. #undef USE_MYSQL
  306.  
  307. /* Define this if you want the 'nosave' keyword.
  308.  */
  309. #define USE_LPC_NOSAVE
  310.  
  311. /* Define this if you want the obsolete and deprecated efuns.
  312.  */
  313. #undef USE_DEPRECATED
  314.  
  315. /* Maximum size of a socket send buffer.
  316.  */
  317. #define SET_BUFFER_SIZE_MAX      32767
  318.  
  319. /* Runtime statistics:
  320.  *  COMM_STAT: count number and size of outgoing packets.
  321.  *  APPLY_CACHE_STAT: count number of hits and misses in the apply cache.
  322.  */
  323. #undef COMM_STAT
  324. #define APPLY_CACHE_STAT
  325.  
  326. /* Which memory manager to use. Possible defines are
  327.  *   MALLOC_smalloc:   Satoria's malloc. Fastest, uses the least memory,
  328.  *                     supports garbage collection.
  329.  *   MALLOC_sysmalloc: the normal system malloc()
  330.  */
  331.  
  332. #define MALLOC_smalloc
  333.  
  334. /* If MIN_MALLOCED is > 0, the gamedriver will reserve this amount of
  335.  * memory on startup for large blocks, thus reducing the large block
  336.  * fragmentation. The value therefore should be a significantly large
  337.  * multiple of the large chunk size.
  338.  * As a rule of thumb, reserve enough memory to cover the first couple
  339.  * of days of uptime.
  340.  */
  341. #define MIN_MALLOCED  0x40000
  342.  
  343. /* If MIN_SMALL_MALLOCED is > 0, the gamedriver will reserve this
  344.  * amount of memory on startup for small blocks, thus reducing the small block
  345.  * fragmentation. The value therefore should be a significantly large
  346.  * multiple of the small chunk size.
  347.  * As a rule of thumb, reserve enough memory to cover the first couple
  348.  * of days of uptime.
  349.  */
  350. #define MIN_SMALL_MALLOCED  0x40000
  351.  
  352. /* This value gives the upper limit for the total allocated memory
  353.  * (useful for systems with no functioning process limit).
  354.  * A value of 0 means 'unlimited'.
  355.  */
  356. #define MAX_MALLOCED         0x1000000
  357.  
  358. /* Define this to annotate all allocations with file:line of the driver
  359.  * source responsible for it.
  360.  * Supported by: MALLOC_smalloc
  361.  */
  362. #undef MALLOC_TRACE
  363.  
  364. /* Define this to annotate all allocations with file:line of the lpc program
  365.  * responsible for it.
  366.  * Supported by: MALLOC_smalloc
  367.  */
  368. #undef MALLOC_LPC_TRACE
  369.  
  370. /* If using TRACE_CODE , how many instructions should be kept? */
  371. #define TOTAL_TRACE_LENGTH      0x1000
  372.  
  373. #endif /* CONFIG_H__ */
  374.